import { qiankunWindow } from 'vite-plugin-qiankun/dist/helper'
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(qiankunWindow.__POWERED_BY_QIANKUN__ ? '/sub-vue3/' : '/'),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: () => import('../pages/home.vue')
    },
    {
      path: '/about',
      name: 'About',
      component: () => import('../pages/about.vue')
    }
  ]
})

export default router
